package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2024-03-13
 * Time: 10:27
 */
public class Test1 {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("节点个数：");
        //System.out.println(binaryTree.size(root));
        binaryTree.size(root);
        System.out.println(BinaryTree.usedSize);
        System.out.println(BinaryTree.leafSize);
        System.out.println(binaryTree.getLeafNodeCount(root));
        System.out.println("=======树的高度=======");
        System.out.println(binaryTree.getHeight(root));
        System.out.println("=======查找=======");
        System.out.println(binaryTree.find(root, 'E'));
    }
}
